import request from '@/utils/request'
import store from '@/stores/index.js'


// 获取用户会员详情
export async function getMemberInfo(data) {
  return await request({
    // url: '/user/member/upgrade-member-card/detail',
    url: '/myMemCenter/cardInfo',
    method: 'get',
  })
}

// 获取会员卡开通详情
export async function getMyMemberCardInfo(data) {
  return await request({
    url: '/myMemCenter/cardInfo',
    method: 'get',
    headers: {
      showLoading:false
    }
  })
}

//支付记录列表
export async function payRecordList(data) {
  return await request({
    url: '/myMemCenter/payRecordList',
    method: 'get',
    params:data
  })
}

//支付记录详情
export async function payRecordDetail(data) {
  return await request({
    url: '/myMemCenter/payRecordDetail',
    method: 'get',
    params:data
  })
}

//支付页会员卡详细信息
export async function payMemberCardDetail(data) {
  return await request({
    url: '/user/member/upgrade-member-card/detail',
    method: 'get',
    params:data
  })
}

//会员卡下单
export async function setMemberCardOrder(data) {
  return await request({
    url: '/user/member/member-card/order',
    method: 'post',
    data:data
  })
}

//更新订单号
export async function updateOrderNo(data) {
  return await request({
    url: '/user/member/member-card/order-no/get',
    method: 'post',
    data:data
  })
}

//领取VIP会员卡
export async function getVipCard(data) {
  return await request({
    url: '/user/member/get-card',
    method: 'post',
    data:data
  })
}